//
//  indexCollectionViewCell.m
//  timemovie
//
//  Created by Yiqiao on 15/7/25.
//  Copyright (c) 2015年 Yiqiao. All rights reserved.
//

#import "indexCollectionViewCell.h"
#import "UIImageView+WebCache.h"
#import "UIViewExt.h"
@implementation indexCollectionViewCell


- (id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        _imageView = [[UIImageView alloc]initWithFrame:CGRectMake((self.width-self.width*0.9)/2, (self.height-self.height*0.9)/2, self.width*0.9, self.height*0.9)];
        [self.contentView addSubview:_imageView];
    }
    return self;
}

- (void)setModel:(MObj *)model{
    _model = model;
    [self setNeedsLayout];
}

- (void)layoutSubviews{
    [super layoutSubviews];
    
    NSString *str = [_model.images objectForKey:@"large"];
    [_imageView sd_setImageWithURL:[NSURL URLWithString:str]];
    
}

@end
